$(function () {
    window.onload = function () {
        $.ajax({
            url: 'http://localhost:3000/useing/public',
            methode: 'get',
            success: function (res) {
                var str = '';
                $.each(res, function (index, item) {
                    if (index < 4) {
                        str += "<li>" +
                            "<div class=xiangqing>" +
                            "<img src=" + item.img + ">" +
                            "<h4>" + item.text + "</h4>" +
                            "<div>" +
                            "<span class=sp>" + item.totalnum + "</span><span class= sp>" + item.num + "</span ></div>" +
                            "<span class=spp>首发</span>" +
                            "<p class=p1><span>" + item.apply + "</span>申请</p>" +
                            "</div>"
                    }

                })
                $(".quanbu ul").html(str);
            }
        })
    }
})